package com.example.stu1.feedback.controller;

import com.example.stu1.feedback.pojo.Feedback;
import com.example.stu1.feedback.service.FeedbackService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;

@RestController
@RequestMapping("/feedback")
public class FeedbackController {
    @Resource
    private FeedbackService service;

    @RequestMapping("/add")
    public void add(Feedback feedback) { service.add(feedback); }

    @RequestMapping("/update")
    public void update(Integer feedbackId) { service.update(feedbackId); }

    @RequestMapping("/query")
    public ArrayList<Feedback> query(Integer feedbackCh) { return service.query(feedbackCh); }
}
